<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>将其他类型转换为Number类型</title>
		<script>
			var a="123.12";
			var b="abc"
			var c=" ";
			var d=true;
			var e=false;
			var f=null;
			var g=undefined;
			//字符串转数字
			a=Number(a);
			console.log(a);   
			b=Number(b);
			console.log(b);
			c=Number(c);
			console.log(c);
			d=Number(d);
			console.log(d);
			e=Number(e);
			console.log(e);
			f=Number(f);
			console.log(f);
			g=Number(g);
			console.log(g);
		</script>
	</head>
	<body>
	</body>
</html>
